﻿namespace Com.PhilChuang.Pmvp.Ui.Views.Impl.ViewModels
{
	public class AbstractViewModel : BaseINPC
	{
		#region Properties
		public bool IsAssociatedWithViewFacadeAndPage
		{ get; set; }

		public bool HasBeenLoaded
		{ get; set; }

		public bool HasBeenUnloaded
		{ get; set; }
		#endregion

		#region Bindable Properties
		private bool myAllControlsEnabled;
		public bool AllControlsEnabled
		{
			get { return myAllControlsEnabled; }
			set
			{
				var changed = myAllControlsEnabled != value;
				myAllControlsEnabled = value;
				RaisePropertyChanged (() => AllControlsEnabled);
				if (changed) OnAllControlsEnabledChanged ();
			}
		}
		#endregion

		protected virtual void OnAllControlsEnabledChanged ()
		{
		}
	}
}
